﻿<UserControl x:Class="Samba.Login.LoginView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Login1="clr-namespace:Samba.Login"
     mc:Ignorable="d" d:DesignWidth="774" Background="{StaticResource {x:Static SystemColors.ControlLightBrushKey}}"
     PreviewTextInput="UserControl_PreviewTextInput" PreviewKeyDown="UserControl_PreviewKeyDown">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Image Grid.Column="0" Stretch="None" Source="{Binding LogoPath}" VerticalAlignment="Center"
             HorizontalAlignment="Center">
        </Image>
        <TextBlock Grid.Row="1" FontSize="30" FontWeight="Black" Foreground="WhiteSmoke" Text="{Binding AppLabel}"
             Margin="5,0,0,-5">
            <TextBlock.Effect>
                <DropShadowEffect Opacity="0.3" ShadowDepth="1" BlurRadius="3">
                </DropShadowEffect>
            </TextBlock.Effect>
        </TextBlock>
        <StackPanel Grid.Column="1" Grid.RowSpan="2" VerticalAlignment="Center">
            <Border Grid.Column="1" Width="350" Height="400" CornerRadius="10" BorderThickness="2"
                 BorderBrush="LightSteelBlue">
                <Login1:LoginPadControl x:Name="PadControl" Margin="15" PinSubmitted="LoginPadControl_PinSubmitted" />
            </Border>
            <TextBlock FontSize="14" HorizontalAlignment="Center" Text="{Binding AdminPasswordHint}"
                 TextAlignment="Center" />
            <Button HorizontalAlignment="Center" MinWidth="100" Height="50" FontWeight="Bold" FontSize="18"
                 Margin="5" Click="Button_Click">
                <DockPanel>
                    <Image Source="Images/LanShutDown.icon.gif" Stretch="None"/>
                    <Label>
                        <LocText ResourceIdentifierKey="Exit"/>
                    </Label>
                </DockPanel>
            </Button>
        </StackPanel>
    </Grid>
</UserControl>